﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.BLL
@using ZoomLaCMS.Models.Field
@using ZoomLa.AppCode.Controls
@using ZoomLa.Controls
@model ZoomLa.Model.Page.M_PageReg
@{
    
    DataTable styleDt = (DataTable)ViewBag.styleDt;
    DataTable applyModDT = (DataTable)ViewBag.applyModDT;
}
@section head{
<title>注册企业黄页</title>
<script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.all.min.js"></script>
}
@section content{
    <div id="pageflag" data-nav="page" data-ban="page"></div>
    <div class="container margin_t5">
        <ol class="breadcrumb">
            <li><a title="会员中心" href="@Url.Action("Default","")">会员中心</a></li>
            <li class="active">企业黄页</li>
        </ol>
        @if (DataConverter.CBool(ViewBag.ShowRegPage.ToString()))
        {
            <form method="post" action="@Url.Action("Page_Apply","Pages")">
                <ul class="fd_body">
                    <li class="fd_item">
                        <div class="fd_item_head">
                            <p style="width:100%;margin:0px;" class="text-center">企业黄页</p>
                            <span class="margin_r5">申请人 :@Model.UserName </span>
                        </div>
                    </li>
                    @if (Model.ID < 1)//仅初次申请时显示,不可修改
                    {
                       
                        <li class="fd_item">
                            <div class="fd_item_head">申请类型</div>
                            <div class="fd_item_field">
                                @MVCHelper.H_Radios("ApplyModel_Rad", applyModDT, "ModelID", "ModelName", Model.ModelID == 0 ? "" : Model.ModelID.ToString())
                            </div>
                        </li>
                    }
                    <li class="fd_item">
                        <div class="fd_item_head">黄页样式</div>
                        <div class="fd_item_field">
                            @Html.Partial("C_TemplateView", new C_TemplateView(styleDt))
                            <div class="clearfix"></div>
                        </div>
                    </li>
                    <li class="fd_item">
                        <div class="fd_item_head">企业名称</div>
                        <div class="fd_item_field">
                            @Html.TextBoxFor(m => m.CompanyName, new { @class = "form-control text_300" })
                        </div>
                    </li>
                    <li class="fd_item">
                        <div class="fd_item_head">企业LOGO:</div>
                        <div class="fd_item_field">
                            @Html.Partial("C_SFileUP", new C_SFileUP { FileType = "img", ID = "LOGO",Value=Model.LOGO })
                        </div>
                    </li>
                    <li class="fd_item">
                        <div class="fd_item_head">企业说明:</div>
                        <div class="fd_item_field">
                            @Html.TextAreaFor(m => m.PageInfo, new { @style = "width:800px;height:400px;" })
                        </div>
                    </li>
                    @Html.Partial("Fields/Index_User_AddContent", new VM_FieldModel(Model.ModelID, 0, new ModelConfig() { Source = ModelConfig.SType.Admin }, 0,(DataRow)ViewBag.valuedr))
                    
                </ul>
                <div class="clear"></div>
                <div class="text-center">
                    <input type="submit" value="提交信息" class="btn btn-primary" />
                </div>
            </form>
        }
        else
        {
            <div class="container">
                <div class="text_600 text-center r_gray" style="margin:0 auto;">
                    <i class="fa fa-bank margin_t10" style="font-size:120px;"></i>
                    <div class="margin_t10" style="font-size:18px;">黄页正在审核,请等待管理员开通您的黄页功能!</div>
                    <div class="margin_t10"><a href="PageInfo?menu=edit" class="btn btn-info">修改申请信息</a></div>
                </div>
            </div>
        }
    </div>
}
@section script{
<script type="text/javascript" src="/JS/Controls/ZL_Dialog.js"></script>
<script type="text/javascript" src="/JS/ZL_Content.js"></script>
<script>
    var nowModel = "@Model.ModelID";
    $("input[name='ApplyModel_Rad']").click(function () {
        if (this.value == nowModel) { return; }
        else { location = "PageInfo?ModelID=" + this.value + "&menu=@Request["menu"]"; }
    });
</script>

@MvcHtmlString.Create(Call.GetUEditor("PageInfo", 2))
}